feat(pi-admission): add standalone pre-history admission example - #38
Draft
johnnygreco wants to merge 1 commit into
Draft
johnnygreco wants to merge 1 commit into
johnnygreco wants to merge 1 commit into
Conversation
johnnygreco
force-pushed
the
johnny/pi-attested-admission
branch
from
August 17, 2026 22:00
bc652d4 to
0540f54
Compare
This was referenced Sep 2, 2026
Documentation previewThe preview has been removed. |
4 tasks
johnnygreco
force-pushed
the
johnny/pi-attested-admission
branch
2 times, most recently
from
September 14, 2026 16:42
4d6909f to
0c6263f
Compare
johnnygreco
force-pushed
the
johnny/pi-attested-admission
branch
from
September 14, 2026 16:48
0c6263f to
cbda7a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
projects/pi-admission/, a standalone use-case example showing why contentmust be admitted before Pi publishes it to live history or saves it to JSONL,
then independently enforced at OpenShell network egress.
OpenShell gRPC middleware.
example.comemail addresses with[EMAIL], denies SSN-shapedsynthetic values, and evaluates decoded content with deny-first semantics.
destination, sandbox, policy identity, and expiry.
CI dependencies, or documentation links.
This refresh replaces the previous Egress Gate-based PR history with one commit
on current
main. It does not delete or otherwise modify the Egress Gate projectthat exists on
main.Flow
flowchart LR C[Pending candidate] --> A[Authenticated HTTPS admission] A -->|deny| D[Not published or saved] A -->|allow or replace| H[Pi live history and JSONL] H --> F[Approve provider context] F --> R[Signed short-lived receipt] R --> Q[OpenShell egress request] Q --> M[Authenticated gRPC middleware] M -->|verify receipt and policy| P[Credentials attached and provider request sent] M -->|reject| B[Network request blocked]sequenceDiagram participant U as User or tool participant Pi as Pi harness participant A as Admission service participant O as OpenShell participant P as Provider U->>Pi: Candidate content Pi->>A: Authenticated admission request A-->>Pi: Allow, replace, or deny alt approved Pi->>Pi: Publish and persist final content Pi->>A: Approve final provider context A-->>Pi: Signed receipt Pi->>O: Provider request plus receipt O->>A: Authenticated middleware evaluation A-->>O: Allow and remove receipt header O->>P: Attach credentials and send else denied Pi->>Pi: Keep candidate out of history and JSONL endValidation
cargo fmt --check, Clippy with warnings denied, 7 tests includinglocalhost HTTPS transport.
0 requiring resolution; native uv/Cargo/npm lock validation passed.
The paid real-model workflow was not run because this checkout has no
.envoroperator-owned
models.json. The README keeps./demo.sh verifyas the explicitremaining acceptance gate; fixture-backed tests are not presented as live model
evidence.
LOC breakdown
For equivalent service/setup functionality, the previous Egress Gate-integrated
implementation was 3,643 handwritten lines versus 1,888 here (Rust service plus
setup helpers), a reduction of about 48%. The TypeScript harness remains intact
to preserve timing, replay metadata, compaction, cancellation, and history-write
evidence.
Review notes
production DLP or identity-validation system.
or all assistant/system history.
same-authority code.